import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/Login';
import Home from '@/views/Home';
import Forget from '@/views/Forget';

import Catalog from '@/components/baseinfo/Catalog';
import Employee from '@/components/baseinfo/Employee';
import SysDict from '@/components/baseinfo/SysDict';
import SysUser from '@/components/baseinfo/SysUser';

import CarAssets from '@/components/assets/CarAssets';
import FinanceAssets from '@/components/assets/FinanceAssets';
import NormalAssets from '@/components/assets/NormalAssets';
import PermanentAssets from '@/components/assets/PermanentAssets';

import CarTrans from '@/components/trans/CarTrans';
import FinanceTrans from '@/components/trans/FinanceTrans';
import NormalTrans from '@/components/trans/NormalTrans';
import PermanentTrans from '@/components/trans/PermanentTrans';


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login,
      hidden: true
    }, {
      path: "/home",
      name: "主页",
      component: Home,
      hidden: true,
      meta: {
        requireAuth: true,
        keepAlive: false
      },
      children: [
        {
          path: "/employee",
          name: "基础信息管理 / 公司职员管理",
          component: Employee
        },
        {
          path: "/catalog",
          name: "基础信息管理 / 资产分类管理",
          component: Catalog
        },
        {
          path: "/sysdict",
          name: "基础信息管理 / 数据字典管理",
          component: SysDict
        },
        {
          path: "/sysuser",
          name: "基础信息管理 / 系统用户管理",
          component: SysUser
        },

        {
          path: "/car",
          name: "资产信息管理 / 车辆资产信息",
          component: CarAssets
        },
        {
          path: "/finance",
          name: "资产信息管理 / 金融资产信息",
          component: FinanceAssets
        },
        {
          path: "/normal",
          name: "资产信息管理 / 普通资产信息",
          component: NormalAssets
        },
        {
          path: "/permanent",
          name: "资产信息管理 / 不动产信息",
          component: PermanentAssets
        },

        {
          path: "/carTrans",
          name: "资产流转管理 / 车辆资产流转管理",
          component: CarTrans
        },
        {
          path: "/financeTrans",
          name: "资产流转管理 / 金融资产流转管理",
          component: FinanceTrans
        },
        {
          path: "/normalTrans",
          name: "资产流转管理 / 普通资产流转管理",
          component: NormalTrans
        },
        {
          path: "/permanentTrans",
          name: "资产流转管理 / 不动产流转管理",
          component: PermanentTrans
        },
      ]
    },
    {
      path: '/forget',
      name: '忘记密码',
      component: Forget,
      hidden: true
    }
  ]
})
